package com.zcz.umengpush.util.android;


import com.zcz.umengpush.util.AndroidNotification;

//@Component
public class AndroidUnicast extends AndroidNotification {
	//家长包名
	private String zczMiActivity = "growing.push.MiPushTestActivity";
	//教师包名
	private String zczJSMiActivity = "ejiang.teacher.push.MiPushTestActivity";
	/**
	 * Android单播
	 * @param appkey
	 * @param appMasterSecret
	 * @throws Exception
	 */
	public AndroidUnicast(String appkey,String appMasterSecret,Integer userType) throws Exception {
			setAppMasterSecret(appMasterSecret);
			setPredefinedKeyValue("appkey", appkey);
			this.setPredefinedKeyValue("type", "unicast");
			if (userType == 0){
				setxiaomi("mi_activity", zczMiActivity);
			}else {
				setxiaomi("mi_activity", zczJSMiActivity);
			}
			setxiaomitrue(true);
	}

	/**
	 * 设置设备令牌
	 * @param token
	 * @throws Exception
	 */
	public void setDeviceToken(String token) throws Exception {
    	setPredefinedKeyValue("device_tokens", token);
    }

}